package com.hqyj.shop.controller;


import com.hqyj.shop.pojo.Recipient;
import com.hqyj.shop.service.RecipientService;
import com.hqyj.shop.util.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author rock
 * @since 2024-10-15 03:22:38
 */
@RestController
@RequestMapping("/recipient")
public class RecipientController {

    @Autowired
    RecipientService service;
   //添加收货人
    @GetMapping("/add")
    public ResultVo add(Recipient r, HttpServletRequest request){
        return service.addRecipient(r,request);
    }
    //查询我的收货人列表
    @GetMapping("/query")
    public ResultVo query(HttpServletRequest request){
        return service.queryRecipient(request);
    }

}

